PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUGetLayoutControl

Obtains a text layout attribute value from a text layout object.

OSStatus ATSUGetLayoutControl (
                     ATSUTextLayout iTextLayout,
                     ATSUAttributeTag iTag,
                     ByteCount iMaximumValueSize,
                     ATSUAttributeValuePtr oValue,
                     ByteCount *oActualValueSize);
iTextLayout
A reference of type ATSUTextLayout. Pass a reference to a text layout object whose attribute value you want to obtain. You cannot pass NULL for this parameter.

iTag
A value of type ATSUAttributeTag. Pass a valid tag that corresponds to the text layout attribute whose value you want to determine. See Text Layout Attribute Tag Constants for a description of the Apple-defined text layout attribute tag constants. If you pass a style run attribute tag constant or an ATSUI-reserved tag in this parameter, ATSUGetLayoutControl returns the result code kATSUInvalidAttributeTagErr.

iMaximumValueSize
The maximum size of the text layout attribute value. If you pass a size that is less than required, ATSUGetLayoutControl returns the result code kATSUInvalidAttributeSizeErr.

oValue
A pointer of type ATSUAttributeValuePtr. Before calling ATSUGetLayoutControl, pass a pointer to memory you have allocated for the attribute value. On return, oValue points to the text layout attribute value. If the attribute was not previously set, ATSUGetLayoutControl passes back its default value in this parameter and returns the result code kATSUNotSetErr.

oActualValueSize
A pointer to a count. On return, the actual size (in bytes) of the attribute value. You should examine this parameter if you are unsure of the size of the attribute value you wish to obtain, as in the case of application-defined text layout attributes.

function result
A result code. See Result Codes.
DISCUSSION
Before calling the ATSUGetLayoutControl function, call the function ATSUGetAllLayoutControls to obtain an array of the tags and data sizes corresponding to all previously set text layout attribute values for every line in a text layout object. To determine the value of a text layout attribute identified by a particular text layout attribute tag, you should pass the appropriate tag and data size pair passed back in the oAttributeInfoArray array of ATSUGetAllLayoutControls to ATSUGetLayoutControl. To determine the value of a text layout attribute value in a single line of a text layout object, call the function ATSUGetLineControl.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)